﻿@{
    ViewBag.Title = "Index";
    var cookie = Request.Cookies[FormsAuthentication.FormsCookieName];
    FormsAuthenticationTicket auth = null;
    if (cookie != null)
    {
        auth = FormsAuthentication.Decrypt(cookie.Value);

        ViewBag.auth = auth;
    }
}

<h2></h2>

<a href="/admin/AddNews" ><div id="admin_menu_buttons"><img src="/content/images/news_add.png" alt="Add News" /><br />Add news</div></a>
<a href="/admin/AllNews" ><div id="admin_menu_buttons"><img src="/content/images/news_all.png" alt="All News" /><br />All news</div></a>

<div>
    @if (auth.UserData == "1")
    {
        <a href="/admin/AddUser" ><div id="admin_menu_buttons"><img src="/content/images/User_add.png" alt="Add user" /><br />Add user</div></a>
        <a href="/admin/AllUsers"><div id="admin_menu_buttons"><img src="/content/images/Users_group.png" alt="All users" /><br />All users</div></a>
    }
</div>

<a href="/Admin/AddCategory"><div id="admin_menu_buttons"><img src="/content/images/category_add.png" alt="Add category" /><br />Add category</div></a>
<a href="/Admin/Categories"><div id="admin_menu_buttons"><img src="/content/images/category_all.png" alt="Categories" /><br />Categories</div></a>
<a href="/Admin/AddTag"><div id="admin_menu_buttons"><img src="/content/images/tags_add.png"  width="48" height="48" alt="Add tag" /><br />Add Tag</div></a>
<a href="/Admin/Tags"><div id="admin_menu_buttons"><img src="/content/images/tags_all.png" width="48" height="48" alt="All tags" /><br />Tags</div></a>

